﻿using ControleRepresentante.Data.Catalogs;
using ControleRepresentante.Data.Helpers;

namespace ControleRepresentante.Data.CatalogSteps
{
    internal class TriviumSupport : CatalogStepBase<ControleRepresentanteCatalogStepTypes>
    {
        protected override ControleRepresentanteCatalogStepTypes CatalogStepType
        {
            get { return ControleRepresentanteCatalogStepTypes.TriviumSupport; }
        }

        public override void Execute(IDataAccess dataAccess)
        {
            CatalogStepHelper catalogStepHelper = new CatalogStepHelper(dataAccess);

            catalogStepHelper
                .GetTable("Representante")
                    .AddColumn("UseTrivium", ColumnType.Boolean, false, false);

            catalogStepHelper
                .CreateTable("FabricaTrivium")
                    .AddColumn("IsTrivium", ColumnType.Boolean, false, false);
        }
    }
}
